package com.chunmeng.service.impl;

import com.chunmeng.dao.JcbPojoMapper;
import com.chunmeng.pojo.JcbPojo;
import com.chunmeng.service.JcbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yd
 * @version 1.0
 * @date 2020/3/6 0006 黄啟军
 */
@Service
public class JcbServiceImpl implements JcbService {
    @Autowired
    JcbPojoMapper jcbPojoMapper;
    /**查询所有*/
    @Override
    public List<JcbPojo> findAll() {
        return jcbPojoMapper.selectAll();
    }
    /**插入*/
    @Override
    public void insert(JcbPojo record) {
        jcbPojoMapper.insert(record);
    }
    /**删除*/
    @Override
    public void remove(Integer id) {
        jcbPojoMapper.deleteByPrimaryKey(id);
    }
    /**更新回显*/
    @Override
    public JcbPojo selectByPrimaryKey(Integer id) {
        return jcbPojoMapper.selectByPrimaryKey(id);
    }
    /**执行更新*/
    @Override
    public void updateJcb(JcbPojo jcbPojo) {
        jcbPojoMapper.updateByPrimaryKey(jcbPojo);
    }
}
